<%@ include file="../common/base.jsp" %>
<%@ page contentType= "text/html;charset=utf-8" %>
<%@ page language="java" import="com.octopus.optiworks.service.ConfigurationService"%>
<% boolean isAutoOperatorDate = ConfigurationService.getInstance().isAutoOpeartorDate() ; %>

<c:forEach var="step10_1Data" varStatus="status" items="${product.step10_1Datas}">
<c:if test="${not empty step10_1}">
<input type="hidden" name="id" value="<c:out value="${step10_1Data.id}" />">
<input type="hidden" name="product" value="<c:out value="${step10_1Data.product.id}" />">
<input type="hidden" name="className" value="com.octopus.optiworks.model.Step10_1Data">
<input type="hidden" name="step" value="step10_1">

<table width="100%">
	<tr>
		<td align="left" width="50%">
			<strong style="color:#A0A0FF"><fmt:message key="label.step10.title" /></strong>
		</td>
		<td align="right" width="50%">
			<strong style="color:#A0A0FF"><fmt:message key="label.step10.testLightCode" />:
				<c:if test="${not empty step10_1Data.testLightCode}">
					<input type="text" name="testLightCode" value="<c:out value="${step10_1Data.testLightCode}" />">
				</c:if>
				<c:if test="${empty step10_1Data.testLightCode}">
					<input type="text" name="testLightCode" value="<c:out value="${currentUser.testLightCode}" />">
				</c:if>
			</strong>
		</td>
	</tr>
</table>
<table rules="all" width="100%" bgcolor="#F0F0FF">
	<tr>
		<td width="15%">
			<fmt:message key="label.step10.filterId" />
		</td>
		<td>
			<input type="text" name="filterId" value="<c:out value="${step10_1Data.filterId}" />">
		</td>
		<td width="15%">
			<fmt:message key="label.step10.grinleosCode" />
		</td>
		<td>
			<input type="text" name="grinleosCode" value="<c:out value="${step10_1Data.grinleosCode}" />">
		</td>
		<td width="15%">
			<fmt:message key="label.step10.filterCode" />
		</td>
		<td>
			<input type="text" name="filterCode" value="<c:out value="${step10_1Data.filterCode}" />">
		</td>
	</tr>
	<tr>
		<td>
			<fmt:message key="label.step10.pigtailLn" />
		</td>
		<td>
			<input type="text" name="pigtailLn" value="<c:out value="${step10_1Data.pigtailLn}" />">
		</td>
		<td>
			<fmt:message key="label.step10.pigtailNeed" />
		</td>
		<td>
			<input type="text" name="pigtailNeed" value="<c:out value="${step10_1Data.pigtailNeed}" />">
		</td>
		<td>
			<fmt:message key="label.step10.pigtailActual" />
		</td>
		<td>
			<input type="text" name="pigtailActual" value="<c:out value="${step10_1Data.pigtailActual}" />">
		</td>
	</tr>
</table>
</c:if>

<c:if test="${empty step10_1}">
<table width="100%">
	<tr>
		<td align="left" width="50%">
			<strong><fmt:message key="label.step10.title" /></strong>
			<shiro:hasPermission name="process:edit">
			<c:if test="${empty step10_1 && empty View}">
			&nbsp;&nbsp;
			<a href="./sedit.o?productId=<c:out value='${product.id}'/>&step=step10_1">
				<fmt:message key="Edit" />
			</a>
			</c:if>
			</shiro:hasPermission>
		</td>
		<td align="right" width="50%">
			<strong><fmt:message key="label.step10.testLightCode" /><c:out value="${step10_1Data.testLightCode}" /></strong>
		</td>
	</tr>
</table>
<table rules="all" width="100%">
	<tr>
		<td width="15%">
			<fmt:message key="label.step10.filterId" />
		</td>
		<td>
			<c:out value="${step10_1Data.filterId}" />
		</td>
		<td width="20%">
			<fmt:message key="label.step10.grinleosCode" />
		</td>
		<td>
			<c:out value="${step10_1Data.grinleosCode}" />
		</td>
		<td width="20%">
			<fmt:message key="label.step10.filterCode" />
		</td>
		<td>
			<c:out value="${step10_1Data.filterCode}" />
		</td>
	</tr>
	<tr>
		<td>
			<fmt:message key="label.step10.pigtailLn" />
		</td>
		<td>
			<c:out value="${step10_1Data.pigtailLn}" />
		</td>
		<td>
			<fmt:message key="label.step10.pigtailNeed" />
		</td>
		<td>
			<c:out value="${step10_1Data.pigtailNeed}" />
		</td>
		<td>
			<fmt:message key="label.step10.pigtailActual" />
		</td>
		<td>
			<c:out value="${step10_1Data.pigtailActual}" />
		</td>
	</tr>
</table>
</c:if>
</c:forEach>








<br>
<c:forEach var="step10_2Data" varStatus="status" items="${product.step10_2Datas}">
<c:if test="${not empty step10_2}">
<input type="hidden" name="id" value="<c:out value="${step10_2Data.id}" />">
<input type="hidden" name="product" value="<c:out value="${step10_2Data.product.id}" />">
<input type="hidden" name="className" value="com.octopus.optiworks.model.Step10_2Data">
<input type="hidden" name="step" value="step10_2">

<table rules="all" width="100%" bgcolor="#F0F0FF">
	<tr>
		<td rowspan="2">
			<fmt:message key="label.step10.title2" />
		</td>
		<td>
			<fmt:message key="label.step10.pb2" />
		</td>
		<td>
			<fmt:message key="label.step10.transIl" />
		</td>
		<td>
			<fmt:message key="label.step10.ripple" />
		</td>
		<td>
			<fmt:message key="label.step10.transHeight" />
		</td>
		<td>
			<fmt:message key="label.step10.dd" />
		</td>
		<td>
			<fmt:message key="label.step10.dcwl" />
		</td>
		<td>
			<fmt:message key="label.step10.pbw" />
		</td>
		<td>
			<fmt:message key="label.step10.reflectHeigh" />
		</td>
		<td>
			<fmt:message key="label.step10.d1d2" />
		</td>
		<td>
			<fmt:message key="label.common.operator" />
		</td>
		<td>
			<fmt:message key="label.common.date" />
		</td>
	</tr>
	<tr height="20px">
		<td>
			<input type="text" name="pb2" size="1" value="<c:out value="${step10_2Data.pb2}" />">
		</td>
		<td>
			<input type="text" name="transIl" size="1" value="<c:out value="${step10_2Data.transIl}" />">
		</td>
		<td>
			<input type="text" name="ripple" size="1" value="<c:out value="${step10_2Data.ripple}" />">
		</td>
		<td>
			<input type="text" name="transHeight" size="1" value="<c:out value="${step10_2Data.transHeight}" />">
		</td>
		<td>
			<input type="text" name="dd" size="1" value="<c:out value="${step10_2Data.dd}" />">
		</td>
		<td>
			<input type="text" name="dcwl" size="1" value="<c:out value="${step10_2Data.dcwl}" />">
		</td>
		<td>
			<input type="text" name="pbw" size="1" value="<c:out value="${step10_2Data.pbw}" />">
		</td>
		<td>
			<input type="text" name="reflectHeigh" size="1" value="<c:out value="${step10_2Data.reflectHeigh}" />">
		</td>
		<td>
			<input type="text" name="d1d2" size="1" value="<c:out value="${step10_2Data.d1d2}" />">
		</td>
		<% if(isAutoOperatorDate){ %>
		<td>
			<c:out value="${step10_2Data.operator}" />
		</td>
		<td>
			<fmt:formatDate  value="${step10_2Data.date}" pattern="yyyy-MM-dd HH:mm"/>
		</td>
		<% }else{ %>
		<td>
			<select name="operator">
			<c:forEach var="user" items="${users}">
			<option value="<c:out value="${user.username}" />" 
			<c:if test="${(null==step10_2Data.operator && user.username==currentUser.username) || (null!=step10_2Data.operator && user.username==step10_2Data.operator)}">
			selected="selected"
			</c:if>
			><c:out value="${user.username}" /></option>
			</c:forEach>
			</select>
		</td>
		<td>
			<input type="text" name="date" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" class="Wdate" style="width:130px" value="<fmt:formatDate  value="${step10_2Data.date}" pattern="yyyy-MM-dd HH:mm"/>">
		</td>
		<% } %>
	</tr>
</table>
<table width="100%">
	<tr>
		<td align="right" bgcolor="#F0F0FF">
			<fmt:message key="label.common.testresult" />
			<c:if test="${step10_2Data.testResult=='Spec' || empty step10_2Data.testResult}">
				<input type="radio" name="<%= StepActionUtil.TESTRESULT %>" value="<%= StepActionUtil.TESTRESULT_SPEC %>" checked><fmt:message key="label.common.specauto" />
			</c:if>
			<c:if test="${step10_2Data.testResult!='Spec' && not empty step10_2Data.testResult}">
				<input type="radio" name="<%= StepActionUtil.TESTRESULT %>" value="<%= StepActionUtil.TESTRESULT_SPEC %>" ><fmt:message key="label.common.specauto" />
			</c:if>
			<c:if test="${step10_2Data.testResult=='Pass'}">
				<input type="radio" name="<%= StepActionUtil.TESTRESULT %>" value="<%= StepActionUtil.TESTRESULT_PASS %>" checked><fmt:message key="label.common.pass" />
			</c:if>
			<c:if test="${step10_2Data.testResult!='Pass'}">
				<input type="radio" name="<%= StepActionUtil.TESTRESULT %>" value="<%= StepActionUtil.TESTRESULT_PASS %>" ><fmt:message key="label.common.pass" />
			</c:if>
			<c:if test="${step10_2Data.testResult=='Waive'}">
				<input type="radio" name="<%= StepActionUtil.TESTRESULT %>" value="<%= StepActionUtil.TESTRESULT_WAIVE %>" checked><fmt:message key="label.common.waive" />
			</c:if>
			<c:if test="${step10_2Data.testResult!='Waive'}">
				<input type="radio" name="<%= StepActionUtil.TESTRESULT %>" value="<%= StepActionUtil.TESTRESULT_WAIVE %>" ><fmt:message key="label.common.waive" />
			</c:if>
			<c:if test="${step10_2Data.testResult=='Fail'}">
				<input type="radio" name="<%= StepActionUtil.TESTRESULT %>" value="<%= StepActionUtil.TESTRESULT_FAILURE %>" checked><fmt:message key="label.common.fail" />
			</c:if>
			<c:if test="${step10_2Data.testResult!='Fail'}">
				<input type="radio" name="<%= StepActionUtil.TESTRESULT %>" value="<%= StepActionUtil.TESTRESULT_FAILURE %>" ><fmt:message key="label.common.fail" />
			</c:if>
		</td>
	</tr>
</table>
</c:if>

<c:if test="${empty step10_2}">
<table rules="all" width="100%">
	<tr>
		<td rowspan="2">
			<fmt:message key="label.step10.title2" />
			<shiro:hasPermission name="process:edit">
			<c:if test="${empty step10_2 && empty View}">
			<br>
			<a href="./sedit.o?productId=<c:out value='${product.id}'/>&step=step10_2">
				<fmt:message key="Edit" />
			</a>
			</c:if>
			</shiro:hasPermission>
		</td>
		<td>
			<fmt:message key="label.step10.pb2" />
		</td>
		<td>
			<fmt:message key="label.step10.transIl" />
		</td>
		<td>
			<fmt:message key="label.step10.ripple" />
		</td>
		<td>
			<fmt:message key="label.step10.transHeight" />
		</td>
		<td>
			<fmt:message key="label.step10.dd" />
		</td>
		<td>
			<fmt:message key="label.step10.dcwl" />
		</td>
		<td>
			<fmt:message key="label.step10.pbw" />
		</td>
		<td>
			<fmt:message key="label.step10.reflectHeigh" />
		</td>
		<td>
			<fmt:message key="label.step10.d1d2" />
		</td>
		<td>
			<fmt:message key="label.common.operator" />
		</td>
		<td>
			<fmt:message key="label.common.date" />
		</td>
	</tr>
	<tr height="20px">
		<td>
			<c:out value="${step10_2Data.pb2}" />
		</td>
		<td>
			<c:out value="${step10_2Data.transIl}" />
		</td>
		<td>
			<c:out value="${step10_2Data.ripple}" />
		</td>
		<td>
			<c:out value="${step10_2Data.transHeight}" />
		</td>
		<td>
			<c:out value="${step10_2Data.dd}" />
		</td>
		<td>
			<c:out value="${step10_2Data.dcwl}" />
		</td>
		<td>
			<c:out value="${step10_2Data.pbw}" />
		</td>
		<td>
			<c:out value="${step10_2Data.reflectHeigh}" />
		</td>
		<td>
			<c:out value="${step10_2Data.d1d2}" />
		</td>
		<td>
			<c:out value="${step10_2Data.operator}" />
		</td>
		<td>
			<fmt:formatDate  value="${step10_2Data.date}" pattern="yyyy-MM-dd HH:mm"/>
		</td>
	</tr>
</table>
<table width="100%">
	<tr>
		<td align="right">
			<fmt:message key="label.common.testresult" />
			<c:out value="${step10_2Data.testResult}" />
		</td>
	</tr>
</table>
</c:if>
</c:forEach>